package com.yanqu.road.entity.activity.daomu.enums;

public enum DaoMuCurioTypeEnum {

    TYPE_COLLECTION(1, "藏品", false),

    TYPE_COLLECTION_CHIP(2, "藏品碎片", false),

    TYPE_EXP(3, "经验石", true),

    TYPE_STOP_BLEED(4, "止血散", true),

    TYPE_MAGNET(5, "磁铁", true),

    TYPE_BOMB(6, "炸弹", true),

    TYPE_CLAY(7, "陶罐", true),

    TYPE_PVP_ATTACK_BUFF(8, "大力丸", true),

    TYPE_PVP_SPEED_BUFF(9, "疾步靴", true),

    TYPE_JADE_ADD_SKILL(10, "镶金古玉增加技能", false),

    TYPE_PVP_CUSTOM(100, "pvp自定义道具", true);

    /**
     * 类型
     */
    private int type;

    /**
     * 名称
     */
    private String name;

    /**
     * 是否局内道具
     */
    private boolean battlePropFlag;



    DaoMuCurioTypeEnum(int type, String name, boolean battlePropFlag) {
        this.type = type;
        this.name = name;
        this.battlePropFlag = battlePropFlag;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public boolean isBattlePropFlag() {
        return battlePropFlag;
    }

    /**
     * 判断是否是局内道具
     * @param type
     * @return
     */
    public static boolean checkBattleProp(int type) {
        for (DaoMuCurioTypeEnum daoMuCurioTypeEnum : DaoMuCurioTypeEnum.values()) {
            if (type == daoMuCurioTypeEnum.getType()) {
                return daoMuCurioTypeEnum.isBattlePropFlag();
            }
        }
        return false;
    }
}
